﻿using System;
using BusinessEntities;
using BusinessLayer;
using Draco.Algorithms;
using Draco.DataStructure;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            MetroGraph g = new MetroGraph();


            //Console.WriteLine(g.FindPath("区庄","西村"));
            //Console.WriteLine(g.FindPath("西村","区庄"));
            //Console.WriteLine(g.FindPath("广州火车站","飞翔公园"));
            //Console.WriteLine(g.FindPath("飞翔公园","广州火车站"));
            //Console.WriteLine(g.FindPath("长寿路","体育西路"));
            //Console.WriteLine(g.FindPath("体育西路", "长寿路"));
            //Console.WriteLine(g.FindPath("三元里", "海珠广场"));
            //Console.WriteLine(g.FindPath("海珠广场", "三元里"));

            //Console.WriteLine("===========================");
            //Console.WriteLine(g.FindPath("中山八", "五羊邨"));
            //Console.WriteLine(g.FindPath("五羊邨", "中山八"));
            //Console.WriteLine(g.FindPath("芳村", "体育西路"));
            //Console.WriteLine(g.FindPath("体育西路", "芳村"));
            //Console.WriteLine(g.FindPath("飞翔公园", "江泰路"));
            //Console.WriteLine(g.FindPath("江泰路", "飞翔公园"));
            //Console.WriteLine(g.FindPath("一德路", "沙河顶"));
            //Console.WriteLine(g.FindPath("沙河顶", "一德路"));
            //Console.WriteLine(g.FindPath("凤凰新村", "鹭江"));
            //Console.WriteLine(g.FindPath("鹭江", "凤凰新村"));

            //Console.WriteLine("===========================");

            //Console.WriteLine(g.FindPath("北京路", "纪念堂"));
            //Console.WriteLine(g.FindPath("海珠广场", "区庄"));
            //Console.WriteLine(g.FindPath("凤凰新村", "一德路"));
            //Console.WriteLine(g.FindPath("北京路", "农讲所"));
            //Console.WriteLine(g.FindPath("黄花岗", "公园前"));

            Console.WriteLine("===========================");

            D_GeoHash geo = new D_GeoHash(498, 250);
            Console.WriteLine(geo.GetGeoHashBase4());
            Console.WriteLine();

            foreach (string s in geo.GetGeoHashBase4For9())
            {
                Console.WriteLine(s);
            }

            Console.WriteLine("===========================");

            GrogshopBLL gb = new GrogshopBLL();

            D_LinkList<Grogshop> nodes = gb.GetNearbySites(440, 150, SeekAdmissibleError.Level_5);

            foreach (Grogshop s in nodes)
            {
                Console.WriteLine(s);
            }


            int[] data = new int[] { 42, 20, 17, 27, 13, 8, 17, 48 };

            int[] result;
            result = D_Sort.QuickSortIndex(data);

            foreach (var temp in result)
            {
                Console.Write(temp + " ");
            }
            Console.WriteLine();
            Console.WriteLine("===========================");
            //Console.ReadKey();

            gb.TEst();

        }



    }
}
